//
// Created by DengLibin on 2018/12/11 0011.
//
/**
 * 函数重载 函数名相同,参数不同（注意缺省参数）,不能通过返回值的类型来实现重载
 */
#include <iostream>
using namespace std;
 void fun(int i)
{
    cout << "i = " << i <<endl;
}
void fun(int i, int a)
{
     cout << "i = " << i << ", a = " << a <<endl;
}
void fun(int i, int a, int c = 10)
{
    cout << "i = " << i << ", a = " << a << ", c = " << a << endl;
}
int main6()
{
     fun(1);
     //fun(2,3); 编译错误
     fun(1,2,3);
    return  0;
}

